Here, the first lambda expression is the mapper ( mapping each element to its size), and the second lambda expression is the reducer, which takes two sizes and adds them. 这里,第一个lambda表达式是映射器(将每个元素映射到它的大小),第二个lambda表达式是一个减法器,它获取两个大小并相加。
If capture of mutable locals were allowed, the platform would need to extend the local variable's lifetime for as long as the dynamic lifetime of any lambda expression that captures it. 如果允许捕获易变局部变量,该平台将需要将局部变量的生命周期延长到任何捕获它的lambda表达式的动态生命周期。
Using a lambda expression, we can make this more compact 在使用lambda表达式时,可以使代码更加简洁
Finally, the last expression applies the lambda expression to the list containing ( 101102). 最终,最后一个表达式对包含(101102)的列表应用这个lambda表达式。
The first line defines a lambda expression and binds it to the symbol total. 第一行代码定义了一个lambda表达式并将其和total符号绑定到一起。
In this particular example, a method reference is a clearer expression of what we mean than a lambda expression, but the idea is the same. 在这个特殊的示例中,与lambda表达式相比,方法引用更清楚地表达出了我们想要表达的东西,但表达的意思是相同的。
The lambda expression simply dumps the data from the custom event into the stories collection. lambda表达式仅将来自定制事件的数据转储到新闻集合中。
Because the lambda expression has the right argument and return types, the compiler verifies that it can be converted into a Comparator and generates the appropriate code for doing so. 因为lambda表达式拥有正确的参数和返回类型,编译器将证实可以把这些类型转换成Comparator,并生成完成此操作的相应代码。
But allowing mutable locals to be captured by lambda expression elevates them to behaving like fields, not locals invisibly and thereby exposes them to the hazards of data races. 通过允许lambda表达式捕获易变的局部变量,会使它们的行为类似于字段,而不是不可见的局部变量,进而将它们暴露在数据竞争的危险之中。
Perhaps the most common use of higher-order functions is the lambda expression, which is Lisp's version of a closure. 高阶函数的最常见用法或许是lambda表达式,这是闭包的Lisp版。
The function defined with lambda is a function used by the macro transformer to convert the expression x into its expansion. 用lambda定义的函数由宏转换器用来将表达式转换为展开形式。
In his article on expression trees Ian Griffiths gives a great introduction to lambda expressions and their relation to expression trees. IanGriffiths在他关于表达式树文章中,给出了一个非常不错的Lambda表达式介绍,以及Lambda与表达式树的关系。
Therefore, when you issue a query over a type that is queryable, the compiler will generate an expression tree rather than a lambda expression. 因此,当你生成一个带IQueryable类型查询的时候,编译器将生成一个表达式树而不是Lambda表达式。
An expression tree is a data representation of the lambda expression in a form that is easy for you to read and reason about the lambda expression in. 表达式树是lambda表达式的一种数据表示形式,它能使你更方便地读取和推断Lambda表达式。
Expression closures are a shorthand method of defining simple functions that mimics lambda notation. 表达式闭包是定义简单函数的一种便捷方式,用来模仿lambda符号。
He has a great example of how you can manipulate the expression trees and build custom conditions in your lambda expressions. 他举出了大量的例子告诉你如何巧妙地处理那些表达式树和编译你的带自定义条件的lambda表达式。
He has a great diagram there showing the expression tree representation of a few lambda expressions. 他在那篇文章里用了非常好的图表来表现说明一些Lambda树的表达式树表示形式。
Parameters: Retrieve the parameters of the lambda expression. Parameters:获取Lambda表达示的参数;
Effects of Ribosomal Protein Mutations on the Expression of Bacteriophage Lambda N Gene in Escherichia coli escherichiacoli核糖体蛋白质突变影响Lambda噬菌体N基因的表达